﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UIWindows.Tools.Helper
{   
    /// <summary>
    /// 不自动生成日志文件
    /// </summary>
    public class MyRollingFileAppender : log4net.Appender.RollingFileAppender
    {
        private bool isFirstTime = true;

        protected override void OpenFile(string fileName, bool append)
        {
            if (isFirstTime)
            {
                isFirstTime = false; //不自动生成日志文件
                return;
            }

            base.OpenFile(fileName, append);
        }
    }
}
